package com.growthserver.mapper;

import com.growthserver.entity.TMemberDiscountEntity;
import com.growthserver.entity.TMemberEntity;
import com.growthserver.entity.TMemberEquityEntity;
import com.growthserver.entity.TMemberLevelEntity;
import com.growthserver.param.CommonParam;
import com.growthserver.param.TMemberDiscountParam;
import com.growthserver.param.TMemberEquityParam;
import com.growthserver.param.TMemberLevelParam;
import com.growthserver.vo.TMemberDiscountVo;
import com.growthserver.vo.TMemberEquityVo;
import com.growthserver.vo.TMemberLevelVo;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

public interface EquityCenterMapper {

    /**
     * 会员列表展示
     * @param tMemberLevelParam
     * @return
     */
    List<TMemberLevelEntity> memberListDisplay(TMemberLevelParam tMemberLevelParam);
    /**
     * 根据ID进行更新
     * @return
     */
    void memberUpdate(TMemberLevelEntity tMemberLevelEntity);

    /**
     * 根据ID进行更新
     * @return
     */
    void equityUpdate(TMemberEquityEntity tMemberEquityEntity);

    /**
     * 根据ID进行更新
     * @return
     */
    void discountUpdate(TMemberDiscountEntity tMemberDiscountEntity);

    /**
     * 根据ID进行删除
     * @param id
     * @return
     */
    void memberDelete(@Param("id") String id);
    /**
     * 根据ID进行删除
     * @param id
     * @return
     */
    void equityDelete(@Param("id") String id);
    /**
     * 根据ID进行删除
     * @param id
     * @return
     */
    void discountDelete(@Param("id") String id);

    /**
     * 根据ID进行是否启用
     * @param id
     * @return
     */
    void memberIsEnable(@Param("id") String id,@Param("isEnable") String isEnable);
    /**
     * 根据ID进行是否启用
     * @param id
     * @return
     */
    void equityIsEnable(@Param("id") String id,@Param("isEnable") String isEnable);
    /**
     * 根据ID进行是否启用
     * @param id
     * @return
     */
    void discountIsEnable(@Param("id") String id,@Param("isEnable") String isEnable);

    /**
     * 会员列表展示
     * @param tMemberEquityParam
     * @return
     */
    List<TMemberEquityEntity> equityListDisplay(TMemberEquityParam tMemberEquityParam);


    /**
     * 会员列表展示
     * @param tMemberDiscountParam
     * @return
     */
    List<TMemberDiscountEntity> discountListDisplay(TMemberDiscountParam tMemberDiscountParam);

    /**
     *
     * @param growthValue
     * @return
     */
    TMemberLevelEntity getUserLeveL(@Param("growthValue") String growthValue,@Param("userType") String userType);


    /**
     * 会员列表创建
     * @param tMemberLevelVo
     */
    void createMemberLvl(TMemberLevelVo tMemberLevelVo);
    String selectMemberLvl(TMemberLevelVo tMemberLevelVo);

    /**
     * 会员等级校验
     * @param tMemberLevelVo
     * @return
     */
    List<TMemberLevelEntity> memberLvlCheck(TMemberLevelVo tMemberLevelVo);

    /**
     * 会员权益创建
     * @param tMemberEquityVo
     */
    void createMemberEquity(TMemberEquityVo tMemberEquityVo);

    /**
     * 查询会员权益等级成长值
     * @param levelNum
     * @return
     */
    List<String> memberEquityCheck(@Param("levelNum") String levelNum);
    HashMap<String,String> memberLevelByUserTypeAndLevelNum(@Param("levelNum") String levelNum );

    /**
     * 会员折扣创建
     */
    void createMemberDiscount(TMemberDiscountVo tMemberDiscountVo);

    /**
     * 权益等级枚举
     */
    List<HashMap<String,String>> equityLvlEnum( CommonParam commonParam);

    /**
     * 权益创建等级枚举
     * @param commonParam
     * @return
     */
    List<HashMap<String,String>> lvlEnum( CommonParam commonParam);

    /**
     * 更新会员信息表
     * @param tMemberEntity
     * @return
     */
    void updateMemberInfo( TMemberEntity tMemberEntity);

}
